<extend name="Public:innerbase"/> 
<block name="css">
<style type="text/css">
	.wm-row{
		margin: 20px 0;
	}
</style>
</block>
<block name="js">
<script type="text/javascript" src="{:RES}/js/spark.util.js"></script>
    <script>
        function drop_confirm(msg, url){
            if(confirm(msg)){
                window.location = url;
            }
        }
    </script>
</block>
<block name="content">
<div class="container-fluid">
	<!-- Nav tabs -->
	<a href="{:U('Guess/index')}" class="btn btn-sm btn-default">
			<span class="glyphicon glyphicon-chevron-left"></span>
			返回
		</a>
        <div style="margin:10px 0;">
			<a href="{:U('Guess/addmessage',array('id'=>$cid))}" title="添加题目" class="btn btn-success">添加题目</a>
		</div>
	<div class="wm-row">
	</div>
	<table class="table wm-table-bordered">
		<thead>
		<tr>
		<th class="select"><input type="checkbox" value="反选" name="button" id="selected"  style="color:#94D38A;"></th>
		<th>题目名称</th>
		<th>正确答案</th>
		<th>状态</th>
		<th>操作</th>

		</tr>
		</thead>
		<tbody>
		<volist name="res" id="item"> 	
		<tr >
		<td id="playlist"><input type="checkbox" name="items" value="{$item.id}"  class="checkitem" /></td>
		<td>{$item.title}</td>
		<td>
			<if condition="$item['rename'] eq 1">
			{$item.name1}
			<elseif condition="$item['rename'] eq 2" />
			{$item.name2}
			<elseif condition="$item['rename'] eq 3" />
			{$item.name3}
		</if>
		</td>
		
		<td><if condition="$item['startdate'] lt time()">
				已使用
			
			<else />
				未使用
			
			</if>
		</td>
		<td>
			<a class="btn btn-xs btn-default" href="{:U('Guess/editmessage',array('id'=>$item['id'],'cid'=>$cid))}" title="编辑">编辑</a> |
			<a class="btn btn-xs btn-default" href="{:U('delmessage?id='.$item['id'].'&cid='.$cid)}">删除</a></td> 
		
		</tr>

		</volist>
		</tbody>
	</table>
	<div class="pages">{$page}</div>
</div>
</block>